<template>
    <el-container>
        <el-header>
            信息管理
        </el-header>
        <el-container>
            <el-aside id="aside_height">
                <!-- 注意要引入 router -->
                <el-menu router :collapse="false">
                    <menu-tree :menus="menus"></menu-tree>
                </el-menu>
            </el-aside>

            <el-main>
                <router-view></router-view>
            </el-main>

        </el-container>
    </el-container>
</template>

<script>
    import MenuTree from "../components/MenuTree";
    export default {
        name: 'Index',
        components: {
            MenuTree
        },
        data() {
            return {
                menus: [],
            }
        },
        mounted() {
            this.axios.get("/menus")
                .then(resp => {
                    this.menus = resp.data;
                    window.console.log(this.menus);
                })
        }
    }
</script>

<style scoped>
    .el-header {
        background-color: #409EFF;
        color: #ffffff;
        line-height: 60px;
        font-size: 28px;
    }
    .el-aside {
        background-color: #e3e3e3;
        width: 200px !important;
    }
    #aside_height{
        height: 700px;
    }
</style>